package com.ponhu.ea2.stockcenter.provider.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 仓库库存变动快照表
 * @TableName ph_stock_inventory_warehouse_change_snapshot
 */
@Data
@Accessors(chain = true)
@TableName(value ="ph_stock_inventory_warehouse_change_snapshot")
public class StockWarehouseChangeSnapshot implements Serializable {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 仓库库存变动ID
     */
    private Long warehouseChangeId;

    /**
     * 货品ID
     */
    private Long inventoryId;

    /**
     * 货品编码
     */
    private String inventoryCode;

    /**
     * 仓库编码
     */
    private String warehouseCode;

    /**
     * 实物库存数
     */
    private Integer realStockNum;

    /**
     * 可用库存数：可用于调拨或锁定的库存数
     */
    private Integer availableStockNum;

    /**
     * 锁定库存数：调拨申请锁定或销售锁定
     */
    private Integer lockedStockNum;

    /**
     * 创建时间
     */
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        return "StockWarehouseChangeSnapshot{" +
                "id=" + id +
                ", inventoryCode='" + inventoryCode + '\'' +
                ", warehouseCode='" + warehouseCode + '\'' +
                '}';
    }
}